<?php 
namespace Admin\Controller;
use Hdphp\Library\Controller;
/**
 * 
 * 
 * 系统设置
 */
class SystemController extends CommonController{

	//系统信息
	public function welcome(){

		$this->display();
	}


	//网站配置
	public function web_set(){

		$this->display();
	}

	//修改密码

	public function passwd(){

    	if(IS_POST){
    		if($_POST['passwdS'] != $_POST['passwdS']){
    			$this->error('密码不一致');
    		}
    		$passwd=md5($_POST['passwdS']);
    		$sql="UPDATE hd_admin SET passwd='{$passwd}' WHERE aid={$_SESSION['admin_aid']} ";
    		M()->exec($sql);
    		$this->success('修改成功','./index.php?m=admin');
    	}

		$this->display();
	}

}

 ?>